package com.jxy.bean.attribute;

import com.jxy.bean.ClassFile;
import com.jxy.bean.constant.ConstantPool;
import com.jxy.tool.Tool;

import java.io.DataInputStream;

public class AttributeSourcefileInfo extends AttributeInfo {
    private int sourcefile_index;

    public AttributeSourcefileInfo(DataInputStream dis, ClassFile cf) {
        super(dis, cf);
        this.sourcefile_index = Tool.readU2(dis);
    }

    @Override
    public String toString() {
        return "AttributeSourcefileInfo{" +
                "sourcefile_index=" + cf.getPools()[sourcefile_index] +
                '}';
    }
}
